package com.geekhalo.domainevent.v3.transaction;

import com.geekhalo.domainevent.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.event.TransactionalEventListener;

@Service
public class TransactionalSMSListener {
    @Autowired
    private SMSService smsService;


    @TransactionalEventListener
    public void sendSMS(OrderCreatedEvent event){
        SendSMSCommand sendSMSCommand = buildSendSMSCommand...
        this.smsService.send(sendSMSCommand);
    }
}
